'use strict';

const ComtrollerService = require('./render');

/**
 * 哪吒报名系列报名接口
*/
class nezaController extends ComtrollerService {
  constructor() {
    super(...arguments);

    this.tableName = 'tx_signupnezha';
    this.downloadExcelHeader = [
      { header: '主键ID', key: 'id', width: 10 },
      { header: '名称', key: 'name', width: 15 },
      { header: '手机号', key: 'phone', width: 15 },
      { header: '车系', key: 'series', width: 15 },
      { header: '第三方回调', key: 'content', width: 30 },
      { header: '经销商ID', key: 'dealer_id', width: 15 },
      { header: 'voId', key: 'voId', width: 15 },
      { header: 'fromSystem', key: 'fromSystem', width: 15 },
      { header: 'cusSource3', key: 'cusSource3', width: 15 },
      { header: '创建时间', key: 'createtime', width: 25 },
    ];
  }

  /**
   * 新增报名数据
  */
  async create() {
    const { ctx } = this;
    const result = await ctx.service.car.commonService.send(ctx.request.body);
    ctx.body = result;
  }

}

module.exports = nezaController;
